<html>
<head><meta charset="utf-8"><title>rust-analyzer#792 `rust-project.json ` · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23792.20.60rust-project.2Ejson.20.60.html">rust-analyzer#792 `rust-project.json `</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="160025730"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23792%20%60rust-project.json%20%60/near/160025730" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23792.20.60rust-project.2Ejson.20.60.html#160025730">(Mar 05 2019 at 18:15)</a>:</h4>
<p><span class="user-mention" data-user-id="133169">@matklad</span> I started on this yesterday. I've got something that builds and I think all it needs are some tests - I was wondering how you envisioned testing this before I start digging too deep into that?</p>



<a name="160025774"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23792%20%60rust-project.json%20%60/near/160025774" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23792.20.60rust-project.2Ejson.20.60.html#160025774">(Mar 05 2019 at 18:15)</a>:</h4>
<p>So this is about the impure "outer" layer of rust analyzer. For these things, I think integration tests work best</p>



<a name="160025827"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23792%20%60rust-project.json%20%60/near/160025827" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23792.20.60rust-project.2Ejson.20.60.html#160025827">(Mar 05 2019 at 18:16)</a>:</h4>
<p>We have a couple of em in <code>heavy_tests</code> folder</p>



<a name="160025874"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23792%20%60rust-project.json%20%60/near/160025874" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23792.20.60rust-project.2Ejson.20.60.html#160025874">(Mar 05 2019 at 18:16)</a>:</h4>
<p>Great, I'll look there. I've got something implemented that I think makes sense, but I probably won't think of all the edge cases that there might be straight away.</p>



<a name="160026039"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23792%20%60rust-project.json%20%60/near/160026039" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23792.20.60rust-project.2Ejson.20.60.html#160026039">(Mar 05 2019 at 18:18)</a>:</h4>
<p>I don't think we need to think about all edge cases, we can fix them as we go</p>



<a name="160026092"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23792%20%60rust-project.json%20%60/near/160026092" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23792.20.60rust-project.2Ejson.20.60.html#160026092">(Mar 05 2019 at 18:19)</a>:</h4>
<p>also cc <span class="user-mention" data-user-id="127859">@Taylor Cramer</span> : this is about make rust-analyzer working <strong>without</strong> Cargo, I think you might be interested in this as well.</p>



<a name="160040661"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23792%20%60rust-project.json%20%60/near/160040661" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23792.20.60rust-project.2Ejson.20.60.html#160040661">(Mar 05 2019 at 21:13)</a>:</h4>
<p><span class="user-mention" data-user-id="133169">@matklad</span> One problem I'm running into is that I can't specify a absolute path in the <code>rust-project.json</code> file in my test (as that gets written in a random tmp directory) but the vfs code expects absolute paths (because that's what Cargo normally is providing). Any ideas?</p>



<a name="160040761"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23792%20%60rust-project.json%20%60/near/160040761" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23792.20.60rust-project.2Ejson.20.60.html#160040761">(Mar 05 2019 at 21:14)</a>:</h4>
<p>(at least, that's my understanding of why I'm seeing exactly nothing work)</p>



<a name="160041293"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23792%20%60rust-project.json%20%60/near/160041293" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23792.20.60rust-project.2Ejson.20.60.html#160041293">(Mar 05 2019 at 21:21)</a>:</h4>
<p>Hm, how tmp sir prevents using an abs path?</p>



<a name="160041719"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23792%20%60rust-project.json%20%60/near/160041719" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23792.20.60rust-project.2Ejson.20.60.html#160041719">(Mar 05 2019 at 21:27)</a>:</h4>
<p>Nevermind, managed to fix it.</p>



<a name="160042435"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23792%20%60rust-project.json%20%60/near/160042435" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23792.20.60rust-project.2Ejson.20.60.html#160042435">(Mar 05 2019 at 21:36)</a>:</h4>
<p><span class="user-mention" data-user-id="133169">@matklad</span>  <a href="https://github.com/rust-analyzer/rust-analyzer/issues/939" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/issues/939">rust-analyzer#939</a></p>



<a name="160042455"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23792%20%60rust-project.json%20%60/near/160042455" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23792.20.60rust-project.2Ejson.20.60.html#160042455">(Mar 05 2019 at 21:36)</a>:</h4>
<p>It will likely need a lot of changes, but it's a start.</p>



<a name="160136667"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23792%20%60rust-project.json%20%60/near/160136667" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23792.20.60rust-project.2Ejson.20.60.html#160136667">(Mar 06 2019 at 21:35)</a>:</h4>
<p><span class="user-mention" data-user-id="133169">@matklad</span> I'm seeing a strange error that I can't explain when working on your review feedback. I get <a href="https://gist.github.com/davidtwco/bb60ec8ec8638c92caaee8f53027f575#file-errors-txt" target="_blank" title="https://gist.github.com/davidtwco/bb60ec8ec8638c92caaee8f53027f575#file-errors-txt">this error</a> for <a href="https://gist.github.com/davidtwco/bb60ec8ec8638c92caaee8f53027f575#file-change-diff" target="_blank" title="https://gist.github.com/davidtwco/bb60ec8ec8638c92caaee8f53027f575#file-change-diff">this diff</a> and nothing else has changed. If I undo that, it builds.</p>



<a name="160137448"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23792%20%60rust-project.json%20%60/near/160137448" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23792.20.60rust-project.2Ejson.20.60.html#160137448">(Mar 06 2019 at 21:44)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@davidtwco</span> that's a compiler bug: <a href="https://github.com/rust-analyzer/rust-analyzer/issues/826" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/issues/826">rust-analyzer#826</a></p>



<a name="160137483"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23792%20%60rust-project.json%20%60/near/160137483" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23792.20.60rust-project.2Ejson.20.60.html#160137483">(Mar 06 2019 at 21:45)</a>:</h4>
<p>Huh, interesting. Thanks.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>